package com.ricky01.service;

import com.ricky01.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    @Qualifier("rickyUser") // 获取rickyUser
    private User user;
    @Autowired
//    @Qualifier("userBeanPost") // 获取user_BeanPost
    private User user2;
    public void showUser(){
        System.out.println("UserService:======"+user);
        System.out.println("UserService2:======"+user2);
    }
}
